package com.lening.iot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.iot.dao.MonmangerDAO;
import com.lening.iot.dto.MonmangerDTO;
import com.lening.iot.po.MonmangerPO;
import com.lening.iot.service.MonmangerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:09
 */
@Service
public class MonmangerServiceImpl extends BaseServiceImpl<MonmangerDAO, MonmangerPO, MonmangerDTO> implements MonmangerService{
    @Autowired(required = false)
    private MonmangerDAO monmangerDAO;
    @Override
    public Page<MonmangerDTO> getAllMmg(Page<MonmangerDTO> monmangerDTOPage) {
        Page<MonmangerDTO> mgList = monmangerDAO.getAllMmg(monmangerDTOPage);
        return mgList;
    }

    @Override
    public List<MonmangerDTO> getAll(String communityname) {
        return monmangerDAO.getAll(communityname);
    }

    @Override
    public Page<?> page(MonmangerDTO monmangerDTO) {
        return monmangerDAO.getAllMmg(monmangerDTO);
    }

    @Override
    public MonmangerPO getById(Long id) {
        return this.monmangerDAO.getById(id);
    }
}
